using System.IO;
using System.Text;

namespace Rsdn.Janus
{
    public class ConfigWriter : StreamWriter
    {
        public ConfigWriter(Stream stream)
            : base(stream, Encoding.UTF8)
        {

        }

        public override void Write(char[] buffer, int index, int count)
        {
            Config.ReplacePattern(buffer, index, count, "&#x0;");     //MLHIDE

            base.Write(buffer, index, count);
        }


        //public override void WriteLine(string value)
        //{
        //    value = Config.ReplaceWrongSymbols(value);

        //    base.WriteLine(value);
        //}
    }
}